package manager;

import java.util.List;

import idao.IOrdersDAO;
import imanager.IOrdersManager;
import model.Orders;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class OrdersManager implements IOrdersManager {

	@Autowired
	private IOrdersDAO ordersDAO;

	public IOrdersDAO getOrdersDAO() {
		return ordersDAO;
	}

	public void setOrdersDAO(IOrdersDAO ordersDAO) {
		this.ordersDAO = ordersDAO;
	}

	public OrdersManager() {
		// TODO Auto-generated constructor stub
	}

	@Transactional
	public boolean insert(Orders orders) {
		// TODO Auto-generated method stub
		return false;
	}

	@Transactional
	public boolean update(Orders orders) {
		// TODO Auto-generated method stub
		return ordersDAO.update(orders);
	}

	@Transactional
	public boolean delete(Orders orders) {
		// TODO Auto-generated method stub
		return ordersDAO.delete(orders);
	}

	@Transactional
	public Orders getOrdersByID(int id) {
		// TODO Auto-generated method stub
		return ordersDAO.getOrdersByID(id);
	}

	@Transactional
	public List<Orders> getAll() {
		// TODO Auto-generated method stub
		return ordersDAO.getAll();
	}

}
